///*
// * test_TaskProcessing.h
// *
// *  Created on: 2014. 6. 16.
// *      Author: jjaehuny
// */

#include <gtest/gtest.h>
#include <glog/logging.h>

#include <Framework/Util/StaticSingleton.h>
#include <Framework/Util/TaskProcessing.h>

class test_framework_util_taskprocessing : public testing::Test
{
public:
	class Dummy : public ::Framework::Util::StaticSingleton<Dummy>
	{
	public:
		Dummy() : taskProcessing_ (1){}
		~Dummy() { LOG(INFO) << __PRETTY_FUNCTION__; }

		void onThread()
		{
			LOG(INFO) << __PRETTY_FUNCTION__;
		}

		::Framework::Util::TaskProcessing taskProcessing_;
	};

public:
	// Sets up the test fixture.
	virtual void SetUp() {}

	// Tears down the test fixture.
	virtual void TearDown() {}
};

TEST_F(test_framework_util_taskprocessing, test_framework_util_taskprocessing_success)
{
	Dummy * pDummy = new Dummy;

	Dummy::Instance().taskProcessing_.PushTask(std::bind(& Dummy::onThread, pDummy));
}
